package org.apache.servicecomb.samples.practise.houserush.sale.dao;

import org.apache.servicecomb.samples.practise.houserush.sale.entity.Favorite;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

public interface FavoriteDao extends JpaRepository<Favorite,Integer> {

    //根据客户id查询收藏数据
    List<Favorite> findAllByCustomerId(int customerId);

    //根据客户id和房源订单id查询收藏的数量
    int countByCustomerIdAndHouseOrderId(int customerId,int houseOrderId);
}
